home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / Install / program files / Borland / BDS / 3.0 / Objrepos / CSharp / WebCustomControl.cs < prev    next >
Encoding:
Text File  |  2004-10-22  |  889 b   |  43 lines

  1. using System;
  2. using System.Web.UI;
  3. using System.Web.UI.WebControls;
  4. using System.ComponentModel;
  5.  
  6. namespace [!Namespace]
  7. {
  8.     /// <summary>
  9.     /// Summary description for [!CustomControlName].
  10.     /// </summary>
  11.     [DefaultProperty("Text"), 
  12.         ToolboxData("<{0}:[!CustomControlName] runat=server></{0}:[!CustomControlName]>")]
  13.     public class [!CustomControlName] : System.Web.UI.WebControls.WebControl
  14.     {
  15.         private string text;
  16.     
  17.         [Bindable(true), 
  18.             Category("Appearance"), 
  19.             DefaultValue("")] 
  20.         public string Text 
  21.         {
  22.             get
  23.             {
  24.                 return text;
  25.             }
  26.  
  27.             set
  28.             {
  29.                 text = value;
  30.             }
  31.         }
  32.  
  33.         /// <summary> 
  34.         /// Render this control to the output parameter specified.
  35.         /// </summary>
  36.         /// <param name="output"> The HTML writer to write out to </param>
  37.         protected override void Render(HtmlTextWriter output)
  38.         {
  39.             output.Write(Text);
  40.         }
  41.     }
  42. }
  43.